var	tools_home="http://dituapi.iask.com:8080/FMP-sina/";
function toReal(x){
	if(typeof(x*1)=="number")
		return x/100000;
	return x;
}
function toCoor(x){
	if(typeof(x*1)=="number")
		return (x*100000).toFixed(0);
	return x;
}
function menuItem(id,text,objType,order,menuFunc){
        this.id=id;
        this.text=text; this.order=order;
        this.objType=objType;
        this.menuFunc=menuFunc;
}
var  mapObj;
var initZoom;
function MapTools(tooltype,zoominpic,zoomoutpic){
	this.tooltype=tooltype; //0-5

	if(this.tooltype==6){
		if(zoominpic!=""&&zoominpic!==null&&zoomoutpic!=""&&zoomoutpic!=null){
			this.zoominpic=zoominpic;
			this.zoomoutpic=zoomoutpic;
		}else{
			this.zoominpic="http://map.sina.com.cn/images/supermap_tobig.png";
        		this.zoomoutpic="http://map.sina.com.cn/images/supermap_tosmall.png";
		}
		var D = document.getElementById("sinaMap"),J = document.getElementById("MAPTOOL_MOREZOOMDIV");
		if(J==null){
			J = document.createElement("DIV");
            		J.style.position = "absolute";
            		J.className = "MFMP_MAPZOOMTOOLS_leftMenu";
            		J.id = "MAPTOOL_MOREZOOMDIV";
            		J.style.width = "80px";
			J.style.left="10px";
            		J.style.top = "5px";
               		J.innerHTML = '<img src='+this.zoominpic+' onclick="g_map.zoomIncenter();"/><img src='+this.zoomoutpic+' onclick="g_map.zoomOutcenter();"/>';
            		D.appendChild(J);
		}else{
			J.style.display = "";
		}
	}
	return this.tooltype;
	
}
function SinaMap(city,centerxy,zoomlevel,hasOverview,maptool,hasCross,hasFull){
	
	this.map = null;
	this.tools = null;
	var sinamap=this;
	this.clickLock = false;
	this._Init = function(city,centerxy,zoomlevel){	
		if ((zoomlevel == "") || (typeof(zoomlevel)	== "undefined"))
			zoomlevel =	13;
		else
			zoomlevel =	parseInt(zoomlevel);		  
		if ((city == "") ||(city==null)||(typeof(city) == "undefined")||!/^[a-zA-Z]+$/.test(city))
			city="beijing";
		var	cx,cy;
		if ((centerxy == "") ||centerxy ==null||(typeof(centerxy) == "undefined")){
			cx=ARR_CITY[city][0];
			cy=ARR_CITY[city][1];
		}else{
			if(typeof centerxy=="object"){
				cx=centerxy[0];
				cy=centerxy[1];
			}else{
				var	xy = centerxy.split(",");
				cx=xy[0];
				cy=xy[1];
			}
		}
		var	mapoption =	new	MMapOptions();
		mapoption.zoom=zoomlevel;
		if(maptool)mapoption.toolbar =maptool.tooltype;
		else mapoption.toolbar =1;
		if(maptool&&maptool.tooltype==5){
			mapoption.toolbarPos = new MPoint(15,18);
		}else{
			mapoption.toolbarPos = new MPoint(10,10);
		}
		if(!hasOverview){
			mapoption.overviewMap=2;
		}else{
			mapoption.overviewMap=1;
		}
		if(hasCross==0)mapoption.centerCross=HIDE;
		if(hasFull==0)mapoption.fullScreenButton=HIDE;
		mapoption.returnCoordType =1;
		mapoption.center=new MLngLat(toReal(cx),toReal(cy),1);
		mapoption.isCongruence=true;
		mapoption.logoUrl =tools_home+"logo.swf";
		mapObj= new MMap("sinaMap",mapoption);
		this.map = mapObj;
                initZoom=mapObj.getZoomLevel();
		this.tools = new MMapTools(this.map);
		this.map.savePosition();
		var bussidiv=document.getElementById('sinaMap').childNodes;
        	for(var i=0;i<bussidiv.length;i++){
                	if(/^(Businessfmp)(.*?)(sinaMap)$/.test(bussidiv[i].id))
                        	bussidiv[i].style.display="none"
        	}
	}
	var provObjs=new Array(),cityObjs=new Array(),shProv=0,shCity=1;
	this.getCity=function(){
		for(var p in ARR_CITY){
			if(!isNaN(p)){
				if(p<34){
					var cx=ARR_CITY[p][0];
	            	var cy=ARR_CITY[p][1];
					picurl="http://map.sina.com.cn/icon/i-point03.gif";
					var overlay=this.addMarker("city"+p,cx,cy,picurl,false);
					provObjs.push(overlay);
					eval("this.map.addEventListener(overlay,MOUSE_CLICK,function(){g_map.zoomCity("+cx+","+cy+",'"+p+"',12)})");
				}
			}
		}
		this.map.addEventListener(this.map,ZOOM_END,this.endZoom);
	}
	this.zoomCity=function(cx,cy,p,level){
		this.centerAndZoom(cx,cy,level);
	}
	this.endZoom=function(){
		if(g_map.map.getZoomLevel()>8&&shProv==0){
			if(provObjs.length==0)return;
				for(var i = 0 ; i < provObjs.length; ++i){
					if(provObjs[i])
						g_map.map.removeOverlay(provObjs[i],true);
				}
				shProv=1;
		}else{
			if(provObjs.length==0)return;
			 for(var i = 0 ; i < provObjs.length; ++i){
				if(provObjs[i])
					g_map.map.addOverlay(provObjs[i],false);
				}
			 shProv=0;
		}
	}
	this.addInitTool=function(){
		var tileLayerOptions =new MTileLayerOptions();   //添加用户编辑器图层 
		tileLayerOptions.tileUrl="http://api.mapabc.com/flashmap/2.0/blackToolBar.swf"; 
		var tl = new MTileLayer(TL_USERMAP,tileLayerOptions); 
		this.map.addTileLayer(tl); 
	}
	this.addInitMenu=function(){
                var menu=new Array();
                menu.push(new menuItem("item1","放大地图","",0,this.menuOperator));
                menu.push(new menuItem("item2","缩小地图","",1,this.menuOperator));
                menu.push(new menuItem("item3","在此居中放置地图","",2,this.menuOperator));
                g_map.addMenuItems(menu);
                g_map.addListener(g_map.map,MENUITEM_CLICK,this.menuOperator)
        }
        this.menuOperator=function(param){
                switch(param.menuItemId){
                        case "item1": {
                                g_map.map.zoomIn(new MLngLat(param.eventX,param.eventY,0),true);
                                break;
                        }
                        case "item2":{
                                g_map.map.zoomOut(new MLngLat(param.eventX,param.eventY,0),true);
                                break;
                        }
                        case "item3":{
                                g_map.map.panTo(new MLngLat(param.eventX,param.eventY,0));
                                break;
                        }
                        default:{
                        //alert(param.menuItemId);
                        }
                }
        }
	penOverViewMap = function(){
		this.map.setOverviewState(1);
	}
	this.closeOverViewMap =	function(){
		this.map.setOverviewState(0);
	}	
	this.hideOverViewMap = function(){
		this.map.setOverviewState(2);
	}	
	
	this.addListener = function(obj,listener,hanler){		
		this.map.addEventListener(obj,listener,hanler)
	}  
	this.removeListener	= function(listener,hanler){		
		this.map.removeEventListener(this.map,listener,hanler)
	} 
	this.saveMap2Img = function(){
		  this.saveMap2JPG();
	}
	
	
	this.addMarker = function(id,x,y,picurl,isCen,isDrag,callBack,picAgent,tipOpt,label,labelStyle,anchor){
		var	markOpt=this.markOpt(picurl,label,labelStyle,isDrag,tipOpt,anchor);
		if(typeof(picAgent)=="boolean")markOpt.picAgent=picAgent;
                else markOpt.picAgent=false;
		var	ll = new MLngLat(toReal(x),toReal(y),1);
		var	overlay	= new MMarker(ll,markOpt);
		overlay.id=id;
		if(isCen!=null)	this.map.addOverlay(overlay,isCen);
		else this.map.addOverlay(overlay,true);
		if(callBack&&callBack!="")this.map.addEventListener(overlay,DRAG_END,dragEnd=function(param){var ll2=sinamap.map.getOverlayById(id).lnglat;callBack(toCoor(ll2.lngX),toCoor(ll2.latY))});
		return overlay;
	}
	

	this.addLine = function(id,points,linestyle,picUrl,speed){
		var arr = new Array();
       		var pointarr = points.split(";");
        	if (pointarr.length <= 1) return;
       		if(Math.round(pointarr.length/500)>1)
        	pointarr=this.selectData(pointarr);
        	for(var i = 0 ; i < pointarr.length ; ++i){
            		var point = pointarr[i].split(",");
            		if (point.length != 2) continue;
            		arr.push(new MLngLat(toReal(point[0]) , toReal(point[1]),1));
        	}
  
        	var opt  = new MLineOptions();
        	opt.lineStyle = linestyle;
		opt.canShowTip=false;
        	var overlay = new MPolyline(arr,opt);
        	overlay.id = id;
        	this.map.addOverlay(overlay,true);
		if(picUrl&&picUrl!=""){
                var mark=this.addMarker("route",parseInt(pointarr[0].split(',')[0]),parseInt(pointarr[0].split(',')[1]),picUrl,'','','','','','',5);
		if(!speed||speed=="")speed=5;
                this.map.markerMoveAlong(mark.id,arr,speed);
                this.map.startMoveAlong(mark.id,true)   
		}
        	return overlay;
	}
	
	this.selectData=function(pointarr)
	{
		
		var dataarr=new Array();
		var num=Math.round(pointarr.length/500);
		for(var i=0;i<pointarr.length-1;i=i+num)
		{
			dataarr.push(pointarr[i]);
		}
		dataarr.push(pointarr[pointarr.length-1]);
		return dataarr;
	}

	this.addCircle = function(id,cx,cy,r,tipOpt,areaStyle){	
		var arr = new Array();
		arr.push(new MLngLat(toReal(cx),toReal(cy),1));
		//var style = this.areaStyle(0.7,color,width,0.3,fillcolor);
		var opt = new MAreaOptions();
		opt.areaStyle=areaStyle;
		opt.tipOption = tipOpt;
		opt.canShowTip	= true;
	 	opt.isEditable	=false;
		var overlay = new MCircle(arr,r,opt);
	 	overlay.id	=id;
		this.map.addOverlay(overlay,true);
		return overlay;
	}
	this.addLineComm = function(id,arr,tipOpt,linestyle){
		var	opt	 = new MLineOptions();
		opt.lineStyle =	linestyle;
		if(tipOpt&&tipOpt!='')opt.tipOption =	tipOpt;
		opt.isEditable =false;
		opt.canShowTip=false;
		var	overlay	= new MPolyline(arr,opt);
		overlay.id = id;
		this.map.addOverlay(overlay);
		return overlay;
	}
	this.addRect = function(id,x1,y1,x2,y2,tipOpt,areaStyle){	
		//画矩形
		var arr = new Array();
		arr.push(new MLngLat(toReal(x1),toReal(y1),1));
		arr.push(new MLngLat(toReal(x2),toReal(y2),1));
		//var style = this.areaStyle(0.7,color,width,0.3,fillcolor);	 
		var opt = new MAreaOptions();
		opt.areaStyle=areaStyle;
		opt.tipOption = tipOpt;
		opt.canShowTip	= true;
		opt.isEditable	=false;
		var overlay = new MRectangle(arr,opt);
		overlay.id	= id;
		this.map.addOverlay(overlay,true);
		return overlay;
	}	
	this.addPolygon	= function(id,points,tipOpt,areaStyle){
		var	arr	= new Array();
		var	pointarr = points.split(";");
		if (pointarr.length	<= 1) return;
		for(var	i =	0 ;	i <	pointarr.length	; ++i){
			var	point =	pointarr[i].split(",");
			if (point.length !=	2) continue;
			arr.push(new MLngLat(toReal(point[0]) ,	toReal(point[1]),1));
		}  
		//var style = this.areaStyle(1,color,3,0.7,fillcolor);	 
		var opt = new MAreaOptions();
		opt.areaStyle=areaStyle;
		opt.tipOption = tipOpt;
		opt.canShowTip	= true;
	 	opt.isEditable	=false;
		var overlay = new MPolygon(arr,opt);
		overlay.id=id;
		this.map.addOverlay(overlay,true);
		return overlay;
	}	
	this.remove	= function(id){
		this.map.removeOverlayById(id);	
	}
	this.removeAll = function(){
		this.map.removeAllOverlays();
               if(divTip)
              {
                 this.closeTip();
		if(typeof(mouse_Click)=="function")this.map.removeEventListener(tipOverlay,MOUSE_CLICK,mouse_Click)
                if(typeof(map_Move)=="function")this.map.removeEventListener(this.map,MAP_MOVING,map_Move);
                if(typeof(map_move_end)=="function")this.map.removeEventListener(this.map,MAP_MOVE_END,map_move_end);
                if(typeof(map_zoom)=="function")this.map.removeEventListener(this.map,ZOOM_CHANGED,map_zoom);
               }
	}
	this.saveMap2JPG= function(){
		this.map.saveMap2JPG();
	}
	this.printMap=function(){
		this.map.printMap();
	}
	this.addLabel =	function(id,x,y,txt,bgColor,borderColor,fontStyle){
		var	opt	= new MLabelOptions();
		opt.content=txt;
		if(bgColor&&bgColor!='')opt.backgroundColor=bgColor;
		if(borderColor&&borderColor)opt.borderColor=borderColor;
		if(fontStyle&&fontStyle!='')opt.fontStyle=fontStyle;
		var	ll = new MLngLat(toReal(x),toReal(y),1);
		var	overlay	= new MLabel(ll,opt);
		overlay.id=id;
		this.map.addOverlay(overlay);
		return overlay;
	 }
	
	
	this.addOverlays = function(overs,isLayOut){
		if(isLayOut!=false)isLayOut=true;  
		this.map.addOverlays(overs,isLayOut);
		return overs;
	 }
	
	this.addMenuItems=function(menu){
		var arr=this.addMenu(menu);
		this.map.addMenuItems(arr);
	}
	


	this.addMenu = function(menu){
		 var arr=new Array();
		 for(var i=0;i<menu.length;i++){
	   var menuItem	= new MMenuItem();
	   menuItem.objectType=menu[i].objType;
	   menuItem.order=menu[i].order;
	   menuItem.menuText=menu[i].text;
	   menuItem.functionName=menu[i].menuFunc;
	   menuItem.id=menu[i].id;
	   menuItem.isEnabled=true;
	   menuItem.isHaveSeparator=true;
	   arr.push(menuItem);
	  }
	  return arr;
	}
	//================================移动图标=====================================	
	this.moveMarkerTo =	function(id,x,y,w,h)
	{
		this.map.markerMoveTo(id,new MLngLat(toReal(x),toReal(y),1),w, h); 
	}
	this.getXY = function(id,iconUrl,callBack,isCen,picAgent){
     this.addListener(this.map,ADD_OVERLAY,setMark=function(evt){
      g_map.removeListener(ADD_OVERLAY,setMark);
			var id=evt.overlayId;
			var marker = sinamap.map.getOverlayById(id);
			var ll=marker.lnglat;
			callBack(toCoor(ll.lngX),toCoor(ll.latY));
			sinamap.map.removeOverlayById(evt.overlayId);
			var  opt= new MMarkerOptions();
			opt.imageUrl =iconUrl;
			opt.imageAlign=8;
			opt.isDraggable=true;
			if(typeof(picAgent)=="boolean")opt.picAgent=picAgent;
                	else opt.picAgent=false;
			var  mark= new MMarker(ll,opt);
    	mark.id=id;
    	sinamap.map.addOverlay(mark,isCen);
    	//sinamap.map.addEventListener(mark,DRAG_END,function(param){callBack(toCoor(param.eventX),toCoor(param.eventY))}); 
	sinamap.map.addEventListener(mark,DRAG_END,function(param){var ll2=sinamap.map.getOverlayById(id).lnglat;callBack(toCoor(ll2.lngX),toCoor(ll2.latY))});
		});
       g_map.setMouseTools(ADD_MARKER);
	}
	this.getCircleXY=function(id,callBack){
			this.addListener(this.map,ADD_OVERLAY,setCircle=function(evt){
				g_map.removeListener(ADD_OVERLAY,setCircle);
				var id=evt.overlayId;
				var marker=sinamap.map.getOverlayById(id);
				var cen=marker.center;
				var r=marker.radius;
				callBack(toCoor(cen.lngX),toCoor(cen.latY),r);
			});
			g_map.setMouseTools(DRAW_CIRCLE);
	}
		this.getRectXY=function(id,callBack){
			this.addListener(this.map,ADD_OVERLAY,setRect=function(evt){
				g_map.removeListener(ADD_OVERLAY,setRect);
				var id=evt.overlayId;
				var marker=sinamap.map.getOverlayById(id);
				var ege=marker.lnglatArr;
				callBack(toCoor(ege[0].lngX),toCoor(ege[1].latY),toCoor(ege[1].lngX),toCoor(ege[0].latY));
			});
			g_map.setMouseTools(DRAW_RECTANGLE);
	}
	this.getFrameXY=function(id,callBack){
		this.addListener(this.map,MOUSE_DOWN,setFrame1=function(evt){
			//for(var p in evt){alert(p)} 
				g_map.removeListener(MOUSE_DOWN,setFrame1);
				callBack(toCoor(evt.eventX),toCoor(evt.eventY));
			});
			g_map.setMouseTools(FRAME_ZOOMIN);
	}
	this.setMouseTools = function(drawType)
	{
		this.map.setCurrentMouseTool(drawType);
              if(drawType=="frameZoomIn"){
				this.map.addEventListener(this.map,MOUSE_UP,frameZoom=function(evt){g_map.map.setCurrentMouseTool(PAN_WHEELZOOM);callBack(toCoor(evt.eventX),toCoor(evt.eventY));});
              }else if(drawType=="addMarkerCtrl"||drawType=="drawCircleCtrl"||drawType=="drawRectCtrl"){
				this.map.addEventListener(this.map,MOUSE_UP,frameZoom=function(evt){g_map.map.setCurrentMouseTool(PAN_WHEELZOOM);});
              }else{
               if("function"==typeof(frameZoom)) this.map.removeEventListener(this.map,MOUSE_UP,frameZoom);
              this.map.addEventListener(this.map,MOUSE_DBCLICK,function(){g_map.map.setCurrentMouseTool(PAN_WHEELZOOM);});
             }
            
	}
	this.setDefaultLineOption=function(style,tipOpt){
		var	opt	 = new MLineOptions();
		opt.lineStyle =	style;
		opt.tipOption =	tipOpt;
		opt.canShowTip = true;
		this.map.setDefaultLineOption(opt);
	 }
	 this.setDefaultMarkerOption=function(iconurl,label,labelStyle,isDraggable,tipOpt){
		this.map.setDefaultMarkerOption(this.markOpt(iconurl,label,labelStyle,isDraggable,tipOpt));
	 }

	 this.setDefaultAreaOption=function(areaStyle,tipOpt){		 
		var opt = new MAreaOptions();
		opt.areaStyle=areaStyle;
		opt.tipOption=tipOpt;
		opt.canShowTip	= true;
		opt.isEditable=false;
		this.map.setDefaultAreaOption(opt);
	 }
   
	this.lineStyle = function(alpha,color,width){
		var	style =	new	MLineStyle();
		style.alpha	= alpha; 
		style.color	= color	;
		style.thickness	= width; 
		return style;
	}
	this.fillStyle = function(alpha,color){
		var	style =	new	MFillStyle();
		style.alpha	= alpha; 
		style.color	= color	;
		return style;
	}

	this.areaStyle = function(ba,bc,width,fa,fc){
		 var style = new MAreaStyle();
		 //多边形的样式
		 style.borderStyle = this.lineStyle(ba,bc,width);
		 //填充色
		 style.fillStyle =this.fillStyle(fa,fc);
		 style.fillStyle.color = fc;
		 return	style;
	}
	this.fontStyle = function(name,size,color,bold){
		var	style=new MFontStyle();
		style.name = name; //字体名称，默认宋体
		style.size = size; //字体大小，默认12
		style.color	= color; //字体颜色，默认黑色
		style.bold = bold;//是否粗体，默认否
		return style;
	}		

	this.labelOption=function(fontStyle,hasBackground,hasBorder,backgroundColor,borderColor,zoomLevels,alpha){
		var labelOptions=new MLabelOptions();
		labelOptions.fontStyle=fontStyle;
		labelOptions.hasBorder = hasBorder;
		labelOptions.hasBackground=hasBackground;
		labelOptions.backgroundColor =backgroundColor;
		labelOptions.borderColor =borderColor;
		labelOptions.zoomLevels= zoomLevels;
		labelOptions.alpha=alpha;
		return labelOptions;
	}
	this.tipOpt=function(title,content,tipWid,lineStyle,titleFontStyle,contentFontStyle,titleFillStyle,contentFillStyle){
		if(!title && !content)return null;
		var	opt	= new MTipOptions();
                var content=content?content:"No Content!";
		opt.title=title;
                opt.content=content;
		opt.hasErrorCorrect=false;
		opt.tipType=1;
		if(lineStyle)opt.borderStyle=lineStyle;
		if(titleFontStyle)opt.titleFontStyle=titleFontStyle;
		if(contentFontStyle)opt.contentFontStyle=contentFontStyle;
		if(titleFillStyle)opt.titleFillStyle=titleFillStyle;
		if(contentFillStyle)opt.contentFillStyle=contentFillStyle;
                if(tipWid)opt.tipWidth=tipWid;
		//for(var i in opt)
		return opt;
	}		

	
	this.getDivTipPosition=function(markid) {
		var marker = this.map.getOverlayById(markid);
		var ll = marker.lnglat;
		return this.map.fromLngLatToContainerPixel(ll);
	}
	this.getLngLatBounds=function(){
		var bounds=this.map.getLngLatBounds();
		var boundxy=(toCoor(bounds.southWest.lngX)+","+toCoor(bounds.northEast.latY)+","+toCoor(bounds.northEast.lngX)+","+toCoor(bounds.southWest.latY));
		return boundxy;
	}
	
	this.markOpt = function(iconurl,label,labelStyle,isDraggable,tipOpt,anchor){
		var	opt	= new MMarkerOptions();
		opt.imageUrl =iconurl;
		opt.label=label; 
		opt.labelStyle =this.fontStyle("颂",14,0xffffff,true);
		if(labelStyle&&labelStyle!="")opt.labelStyle=labelStyle;
		opt.labelPosition =	new	MPoint(5,0);
		opt.isDraggable=isDraggable;//是否可以拖动 
		if(anchor&&anchor!="")opt.imageAlign=anchor;
		if(typeof(tipOpt)=="object"){
			opt.tipOption =	tipOpt;
			opt.canShowTip = true;
		}
		opt.isEditable =false;
		opt.hasShadow =	true;
		return opt;
	}
	this.centerAndZoom = function(cx,cy,level){
		this.map.setZoomAndCenter(level,new	MLngLat(toReal(cx),toReal(cy),1));
	}
	this.setZoomEnabled=function(isZoom){
		this.map.setZoomEnabled(isZoom);
	}
	this.openOverlayTip= function(id){
		this.map.openOverlayTip(id);
	}
	this.addTip	= function(x,y,title,content){
		var	opt	= new MTipOptions();
		opt.title=title;
		opt.content= content;
		this.map.openTip(new MLngLat(toReal(x),toReal(y),1),opt);
	}
	
	this.setEditable = function(id,bool){
		this.map.setOverlayEditableById(id,bool)
	}
	this.setContinuousZoom = function(bool)	{
		this.map.setContinuousZoom(bool);
	}
	this.isContinuousZoom =	function() {
		return this.map.isContinuousZoom();
	}
	
	this.saveLastView =	function(){//保留中心点和zoom级别
		this.map.savePosition();
	}
	this.returnToSaved=function(){
		this.map.returnToSavedPosition();
	}
	this.zoomTo	= function(zoomLevel){
		 this.map.setZoomLevel(zoomLevel);				
	}

	this.zoomOut = function(x,y,bool){
		this.map.zoomOut(new MLngLat(toReal(x),toReal(y),1),bool);
	}
	this.zoomIn	= function (x,y,bool){
		this.map.zoomIn(new	MLngLat(toReal(x),toReal(y),1),bool); 
	}		
	this.zoomIncenter=function(){
        	var cen=this.getCenter();
        	this.zoomIn(cen.split(',')[0],cen.split(',')[1],true);
	}
	this.zoomOutcenter=function(){
		var cen=this.getCenter();
                this.zoomOut(cen.split(',')[0],cen.split(',')[1],true);
	}
	this.zoomBy=function(zoomNum){
		var level=parseInt(this.map.getZoomLevel())+parseInt(zoomNum);
                this.zoomTo(level);
	}	
	this.moveToCenter =	function(x,y){
		this.map.setCenter(new MLngLat(toReal(x),toReal(y),1));
	}
	this.moveToCity=function(code){
		if(ARR_CITY[code]){
			this.map.setCenter(new MLngLat(toReal(ARR_CITY[code][0]),toReal(ARR_CITY[code][1]),1));
		}	
	}
	this.panTo = function(x,y){
		this.map.panTo(new MLngLat(toReal(x),toReal(y),1));
	}
	this.panBy = function(w,h){//w,h以像素为单位,w的正方向为左,h的正方形为上
		this.map.panBy(new MSize(w,h));
	}
	this.panDirection =	function(horizontal,vertical){//h的正方向为左,v的正方形为上,为表示方向的确定数字1和-1
		this.map.panDirection(horizontal,vertical);
	}
	this.getCenter = function(x,y){
		var	cxy=this.map.getCenter();
		return toCoor(cxy.lngX)+","+toCoor(cxy.latY);
	}
	this.getPixelBounds	= function()
	{
		var	view=this.map.getPixelBounds();
		return view.minX+","+view.minY+","+view.maxX+","+view.maxY;
	}
	var divTip=null,tipOverlay,pt=null,poiarr=new Array(),view,size,twid,markid1;	
	this._divTipOpt=function(title,content,tail,tipWidth){
		if(!title && !content)return null;
		if(typeof(callBackCloseTip)=="undefined")callBackCloseTip=false;
		var html="";
		html+="<div class=\"tiptop\">"; 
		html+="<div id=\"topleft\" class=\"topleft\"></div>";
		html+="<div class=\"topright\"><span class=\"close\" onclick=\"g_map.closeTip(callBackCloseTip)\">&times;</span></div>";
		html+="</div>";
	
		html+="<div class=\"tipconwrap\">";
 	 	html+="<div class=\"tipcon\">";
  		html+="<div id=\"tipCtrlCon\"></div>";
 	 	html+="<div id=\"tipTail\"></div>"

   		html+="</div></div>"
  		html+="<div class=\"tipbot\"></div>";
 
	 	var objdiv=document.createElement("DIV");
		var objname="tip";
		objdiv.id = objname;
		objdiv.innerHTML=html;
		objdiv.style.position = 'absolute';
	 	objdiv.style.zIndex=document.getElementById("sinaMap").style.zIndex;
                document.getElementById("main").appendChild(objdiv);
                var tipTop=document.getElementById("topleft");
                tipTop.innerHTML=title;
                var tipCont=document.getElementById("tipCtrlCon");
                tipCont.innerHTML=content;
                var tipTail=document.getElementById("tipTail");
                tipTail.innerHTML=tail;
                if(navigator["appVersion"].substr(22,1)=="6"&&tail!=""){
                        document.getElementById("hideTotab").className="hideTotab_ie6";
			if(tipWidth&&tipWidth!=""&&tipWidth>215)objdiv.style.width=tipWidth+"px";
			else if(tipWidth&&tipWidth!=""&&tipWidth<=215)objdiv.style.width="215px";
                }else if(tipWidth&&tipWidth!="")objdiv.style.width=tipWidth+"px";
                divTip = document.getElementById("tip");
	}
	
	this._addSinglePoi =function(poi,getTitles,getContents,getTails,tipWidth,anchor,picAgent){
		var	markOpt	= new MMarkerOptions();
		markOpt.imageUrl =poi.icon;	
		if(typeof(picAgent)=="boolean")markOpt.picAgent=picAgent;
		else markOpt.picAgent=false;
		if(anchor&&anchor!="")markOpt.imageAlign=anchor;
		var	ll = new MLngLat(toReal(poi.x),toReal(poi.y),1);
		var	overlay	= new MMarker(ll,markOpt);
	    if(poi.id)overlay.id=poi.id;
		this.map.addOverlay(overlay,true);
        if(getTitles && getContents){
		this.map.addEventListener(overlay,MOUSE_CLICK,mouse_Click=function(){g_map._onMouseClick(poi,getTitles,getContents,getTails,tipWidth)});
	    this.map.addEventListener(this.map,MAP_MOVING,map_Move=function(){ g_map.setDivTipPosition();});
        this.map.addEventListener(this.map,MAP_MOVE_END,map_move_end=function(){g_map.setDivTipPosition();});
		this.map.addEventListener(this.map,ZOOM_CHANGED,map_zoom=function(){g_map.setDivTipPosition();});
        }        
		return overlay
	}	

	this._addSinglePoiLabel =function(poi,getTitles,getContents,getTails,tipWidth,anchor,content,fontstyle,x,y,picAgent){
                var     markOpt = new MMarkerOptions();
                markOpt.imageUrl =poi.icon;
		if(typeof(picAgent)=="boolean")markOpt.picAgent=picAgent;
                else markOpt.picAgent=false;
                if(anchor&&anchor!="")markOpt.imageAlign=anchor;
                var     ll = new MLngLat(toReal(poi.x),toReal(poi.y),1);
                if(content&&content!=""){
			markOpt.label=content;
                	markOpt.labelStyle=fontstyle;
                	markOpt.labelPosition= new MPoint(x,y);
		}
                var     overlay = new MMarker(ll,markOpt);
            if(poi.id)overlay.id=poi.id;
                this.map.addOverlay(overlay,true);
        if(getTitles && getContents){
                this.map.addEventListener(overlay,MOUSE_CLICK,mouse_Click=function(){g_map._onMouseClick(poi,getTitles,getContents,getTails,tipWidth)});
            this.map.addEventListener(this.map,MAP_MOVING,map_Move=function(){ g_map.setDivTipPosition();});
        this.map.addEventListener(this.map,MAP_MOVE_END,map_move_end=function(){g_map.setDivTipPosition();});
                this.map.addEventListener(this.map,ZOOM_CHANGED,map_zoom=function(){g_map.setDivTipPosition();});
        }
                return overlay
        }
	var istails=true;	
	this._addPois = function(pois,getTitles,getContents,getTails,tipWidth,anchor,dmColor,isLayOut,picAgent){
	if(getTails=="")istails=false;
    	this.removeAll();
     	poiarr=pois;
    	var	overlays=new Array();
		for(var i=0;i<pois.length;i++){
		  var	markOpt	= new MMarkerOptions();
		  markOpt.imageUrl =pois[i].icon; 
		  if(typeof(picAgent)=="boolean")markOpt.picAgent=picAgent;
                	else markOpt.picAgent=false;
		  if(anchor&&anchor!="")markOpt.imageAlign=anchor;
		  if(dmColor&&dmColor!=""){
			markOpt.isDimorphic=true;
			markOpt.dimorphicColor=dmColor;
		  }
		  var	ll = new MLngLat(toReal(pois[i].x),toReal(pois[i].y),1);
		  var	overlay	= new MMarker(ll,markOpt);
		  overlay.id=pois[i].id;
		  overlays.push(overlay);
     	if(getTitles&& getContents){
     	eval("this.map.addEventListener(overlay,MOUSE_CLICK,mouse_Click=function(){g_map._onMouseClick(pois["+i+"],getTitles,getContents,getTails,tipWidth);})");
		 this.map.addEventListener(this.map,MAP_MOVING,map_Move=function(){g_map.setDivTipPosition();});
         this.map.addEventListener(this.map,MAP_MOVE_END,map_move_end=function(){g_map.setDivTipPosition();});
		 this.map.addEventListener(this.map,ZOOM_CHANGED,map_zoom=function(){g_map.setDivTipPosition();});
        }		
		}
		var overs=this.addOverlays(overlays,isLayOut);
		if(isLayOut||typeof(isLayOut)=="undefined"){setTimeout("g_map.zoomBy(1)",1000);}
		return overs;
	}	
	

	this._addPoisLabel = function(pois,getTitles,getContents,getTails,tipWidth,anchor,content,fontstyle,x,y,isLayOut,picAgent){
        this.removeAll();
        poiarr=pois;
        var     overlays=new Array();
                for(var i=0;i<pois.length;i++){
                  var   markOpt = new MMarkerOptions();
                  markOpt.imageUrl =pois[i].icon;
		 if(typeof(picAgent)=="boolean")markOpt.picAgent=picAgent;
                else markOpt.picAgent=false;
                  if(anchor&&anchor!="")markOpt.imageAlign=anchor;
                  var   ll = new MLngLat(toReal(pois[i].x),toReal(pois[i].y),1);
		if(content&&content!=""){
                        markOpt.label=content[i];
                        markOpt.labelStyle=fontstyle;
                        markOpt.labelPosition= new MPoint(x,y);
                }
                  var   overlay = new MMarker(ll,markOpt);
                  overlay.id=pois[i].id;
                  overlays.push(overlay);
        if(getTitles&& getContents){
        eval("this.map.addEventListener(overlay,MOUSE_CLICK,mouse_Click=function(){g_map._onMouseClick(pois["+i+"],getTitles,getContents,getTails,tipWidth);})");
                 this.map.addEventListener(this.map,MAP_MOVING,map_Move=function(){g_map.setDivTipPosition();});
         this.map.addEventListener(this.map,MAP_MOVE_END,map_move_end=function(){g_map.setDivTipPosition();});
                 this.map.addEventListener(this.map,ZOOM_CHANGED,map_zoom=function(){g_map.setDivTipPosition();});
        }      
                }
                var overs=this.addOverlays(overlays,isLayOut);
                return overs;
        }      

	this.addMarkLabel=function(id,content,labelOption,x,y){
		var mark=this.map.getOverlayById(id);
		labelOption.content=content;
		mark.option.labelOption=labelOption;
                mark.option.labelPosition= new MPoint(x,y);
        	this.map.updateOverlay(mark);
    	}
	this.removeMarkLabel=function(id){
		var mark=this.map.getOverlayById(id);
		if(mark){
			var labelOptions=new MLabelOptions();
			labelOptions.hasBorder =false;
			labelOptions.hasBackground =false;
			labelOptions.content='';
			mark.option.labelOption=labelOptions;
                	this.map.updateOverlay(mark);
		}
	}
	this._onMouseOver=function(overlays,icon,content,labelOption,x,y){
		for(var p in labelOption)if(p=="size")labelOption=g_map.labelOption(g_map.fontStyle("颂",14,0xffffff,false),true,true,0xDE5757,0xffffff,'',1)
		 overlays.option.imageUrl =icon;
		overlays.option.hasShadow=false;
		if(typeof labelOption=="undefined") overlays.option.label=content;
		else labelOption.content=content;	
                if(labelOption&&labelOption!="")overlays.option.labelOption=labelOption;
		if(x&&x!="")overlays.option.labelPosition= new MPoint(x,y)
		 g_map.map.updateOverlay(overlays);
   	
   	}
	this._onMouseClick=function(poi,getTitles,getContents,getTails,tipWidth,tipFlag){
		tipOverlay=g_map.map.getOverlayById(poi.id);
		size=this.map.getSize();
        	markid1=poi.id;
        	var	head='',content='',tail='';
		if(typeof(getTitles)=="function")head=getTitles(poi);
	   	if(typeof(getContents)=="function")content=getContents(poi);
     		if(istails&&typeof(getTails)=='function')tail=getTails(poi);
		if (divTip == null) {			
			g_map._divTipOpt(head,content,tail,tipWidth);
		}else{
     	   		document.getElementById("topleft").innerHTML=head;
     	   		document.getElementById("tipCtrlCon").innerHTML=content;
	  		document.getElementById("tipTail").innerHTML=tail;
			if(navigator["appVersion"].substr(22,1)=="6"&&tail!=""){
                        	document.getElementById("hideTotab").className="hideTotab_ie6";
                        	if(tipWidth&&tipWidth!=""&&tipWidth>215)divTip.style.width=tipWidth+"px";
                        	else if(tipWidth&&tipWidth!=""&&tipWidth<=215)divTip.style.width="215px";
                	}else if(tipWidth&&tipWidth!="")divTip.style.width=tipWidth+"px";
     		}
		g_map.setMapPan(poi.id,tipFlag);
        	g_map.setDivTipPosition();
	}
	this.getXYPosition=function(x,y){
                var ll = new MLngLat(toReal(x),toReal(y),1);
                return this.map.fromLngLatToContainerPixel(ll);
        }
    this.setMapPan=function(markid,tipFlag){
      	if(divTip.style.zIndex>document.getElementById("sinaMap").style.zIndex)return;
	pt= this.getDivTipPosition(markid1);
	mapwidth=document.getElementById("sinaMap").offsetWidth;
        var xdis=tipFlag?125:45;
        var ydis=tipFlag?6:3;
        var xinval=tipFlag?45:30;
        var yinval=tipFlag?25:20;
        var ydist=tipFlag?15:5;
	if((pt.x<size.width&&pt.x>0)&&((mapwidth-pt.x-divTip.offsetWidth)>0||pt.x>divTip.offsetWidth)){
		var panx=0;
	//}else if((mapwidth-divTip.offsetWidth)<divTip.offsetWidth/3){
	}else if((3*mapwidth/5)<divTip.offsetWidth){
		if(mapwidth-pt.x<mapwidth/2){
			var panx=parseInt(pt.x-divTip.offsetWidth);
		}else{
			var panx=size.width-pt.x>divTip.offSetWidth?0:divTip.offsetWidth-size.width+pt.x-8;	
		}	
	}else{
		if(pt.x<divTip.offsetWidth){
			var panx=pt.x<xinval?parseInt(pt.x-xdis):0;
                }else if(pt.x>size.width-divTip.offsetWidth){
                        var panx=pt.x>size.width?parseInt(pt.x)-parseInt(size.width)+5:0;
                }
	}
	var tailsh=document.getElementById("sh");
	if(tailsh!=null&&tailsh.style.display=="block"){
		var pany=0;	
	}else{
        	var pany=pt.y>parseInt(size.height)?parseInt(pt.y-size.height+ydist):parseInt(pt.y)-parseInt(divTip.offsetHeight)-ydis;
        	pany=pt.y>parseInt(size.height)||pt.y<parseInt(divTip.offsetHeight+yinval)?pany:0;
	}
        this.map.panBy(new MSize(panx,pany));
    }
    this.setDivTipPosition=function() {
    var map_obj=document.getElementById("sinaMap");
	size=this.map.getSize();
	view=this.map.getPixelBounds();
       	pt = this.getDivTipPosition(markid1);
       	if(pt.x<0||pt.y<0||pt.y>parseInt(size.height)||pt.x>parseInt(size.width))
       	{
            	divTip.style.display="none";
       	}else{
		divTip.style.display="block";
		var mapwidth=map_obj.offsetWidth;
		var mapheight=map_obj.offsetHeight;
                divTip.style.top =(parseInt(pt.y)-parseInt(divTip.offsetHeight)+parseInt(map_obj.offsetTop)-3)+"px";
		if(pt.x>=divTip.offsetWidth||mapwidth-pt.x<mapwidth/2){
                        divTip.className="opposite";
				divTip.style.left = parseInt(pt.x)+parseInt(map_obj.offsetLeft)-parseInt(divTip.offsetWidth)+8+"px";
                }else{
			divTip.className="";
				divTip.style.left = parseInt(pt.x)+parseInt(map_obj.offsetLeft)-10+"px";
		}	
      }
    }
    this.returnPoi=function(){
        return poiarr;
    }
	this.closeTip=function(callBack){
       		var tip=document.getElementById("tip");
        	if(typeof(callBack)=="function")callBack(markid1)
       		document.getElementById("main").removeChild(tip);
       		divTip=null;
    	}
	
	this.setArea = function(pois){
    	this.removeAll();
    	poiarr=pois;
    	var	overlays=new Array();
		for(var	i=pois.length-1;i>=0;i--){
		  var	markOpt	= new MMarkerOptions();
		  var	ll = new MLngLat(toReal(pois[i].x),toReal(pois[i].y),1);
		  var	overlay	= new MMarker(ll,markOpt);
		  overlays.push(overlay);
		}
		var overs=this.addOverlays(overlays,true);
		for(var i=0;i<overlays.length;i++)
			this.map.removeOverlay(overlays[i])
	}	
	this.MDivTipOpt=function(title,content,titleFontStyle,contentFontStyle,borderStyle,titleFillStyle,fillStyle,roundRectSize,hasShadow,tipWidth,tipHeight){
		var tipOptions=new MTipOptions();
		tipOptions.tipType=HTML_BUBBLE_TIP;
		tipOptions.tipAlign=BOTTOM_RIGHT; 
		if(title&&title!='')tipOptions.title=title;
		if(content&&content!='')tipOptions.content=content;
		if(titleFontStyle&&titleFontStyle!='')tipOptions.titleFontStyle=titleFontStyle;
		if(contentFontStyle&&contentFontStyle!='')tipOptions.contentFontStyle=contentFontStyle;
		if(borderStyle&&borderStyle!='')tipOptions.borderStyle=borderStyle;
		if(titleFillStyle&&titleFillStyle!='')tipOptions.titleFillStyle=titleFillStyle;
		if(fillStyle&&fillStyle!='')tipOptions.fillStyle=fillStyle;
		if(roundRectSize&&roundRectSize!='')tipOptions.roundRectSize=roundRectSize;
		if(hasShadow&&hasShadow!='')tipOptions.hasShadow=hasShadow;
		if(tipWidth&&tipWidth!='')tipOptions.tipWidth=tipWidth;
		if(tipHeight&&tipHeight!='')tipOptions.tipHeight=tipHeight;
		return tipOptions;
		
	}
	this.MFlashTipOpt=function(title,content,titleFontStyle,contentFontStyle,borderStyle,titleFillStyle,fillStyle,roundRectSize,hasShadow,tipWidth,tipHeight){
                var tipOptions=new MTipOptions();
                tipOptions.tipType=FLASH_BUBBLE_TIP;
                tipOptions.tipAlign=BOTTOM_RIGHT;
                if(title&&title!='')tipOptions.title=title;
                if(content&&content!='')tipOptions.content=content;
                if(titleFontStyle&&titleFontStyle!='')tipOptions.titleFontStyle=titleFontStyle;
                if(contentFontStyle&&contentFontStyle!='')tipOptions.contentFontStyle=contentFontStyle;
                if(borderStyle&&borderStyle!='')tipOptions.borderStyle=borderStyle;
                if(titleFillStyle&&titleFillStyle!='')tipOptions.titleFillStyle=titleFillStyle;
                if(fillStyle&&fillStyle!='')tipOptions.fillStyle=fillStyle;
                if(roundRectSize&&roundRectSize!='')tipOptions.roundRectSize=roundRectSize;
                if(hasShadow&&hasShadow!='')tipOptions.hasShadow=hasShadow;
                if(tipWidth&&tipWidth!='')tipOptions.tipWidth=tipWidth;
                if(tipHeight&&tipHeight!='')tipOptions.tipHeight=tipHeight;
                return tipOptions;

        }
	this.MMarkOptComm=function(canShowTip,imageAlign,isDraggable,hasShadow,isDimorphic,dimorphicColor,zoomLevels,picAgent){
		var markerOption = new MMarkerOptions();
		if(canShowTip&&canShowTip!='')markerOption.canShowTip=canShowTip;
		if(imageAlign&&imageAlign!='')markerOption.imageAlign=imageAlign;
		if(isDraggable&&isDraggable!='')markerOption.isDraggable=isDraggable;
		//markerOption.labelPosition=labelPosition;
		if(hasShadow&&hasShadow!='')markerOption.hasShadow=hasShadow;
		if(isDimorphic&&isDimorphic!='')markerOption.isDimorphic=isDimorphic;
		if(dimorphicColor&&dimorphicColor!='')markerOption.dimorphicColor=dimorphicColor;
		if(zoomLevels&&zoomLevels!='')markerOption.zoomLevels=zoomLevels;
		if(picAgent&&picAgent!='')markerOption.picAgent=picAgent;
		return markerOption;
	}
	this.MLabelOpt=function(content,fontStyle,hasBackground,hasBorder,backgroundColor,borderColor,alpha,zoomLevels){
		var opt = new MLabelOptions();
                opt.content=content;
		if(hasBackground&&hasBackground!='')opt.hasBackground=hasBackground;
		if(hasBorder&&hasBorder!='')opt.hasBorder=hasBorder;
                if(backgroundColor&&backgroundColor!='')opt.backgroundColor=backgroundColor;
                if(borderColor&&borderColor)opt.borderColor=borderColor;
                if(fontStyle&&fontStyle!='')opt.fontStyle=fontStyle;
		if(alpha&&alpha!='')opt.alpha=alpha;
		if(zoomLevels&&zoomLevels!='')opt.zoomLevels=zoomLevels;
                return opt;
	}
	this.MAddSinglePoi=function(poi,markopt,tipopt,labelopt,labelpos){
		if(!markopt||markopt=='')return false;
		markopt.imageUrl=poi.icon;
		if(labelopt&&labelopt!='')markopt.labelOption=labelopt;
		if(labelpos&&labelpos!='')markopt.labelPosition=labelpos;
		//var tail=showSearch(poi);
		//var tipcont=tipopt.content;
		//tipopt.content=tipopt.content+tail;
                if(tipopt&&tipopt!='')markopt.tipOption=tipopt;
		var ll = new MLngLat(toReal(poi.x),toReal(poi.y),1);
                var overlay = new MMarker(ll,markopt);
            	overlay.id=poi.id;
                this.map.addOverlay(overlay,true);
		return overlay;
		
        }
	this.addMorePois=function(pois,markopt,tipopts){
	}
	this.MCluster=function(grid,maxzoom) {//点聚合  
		var clusterOptions=new MClusterOptions();  
		clusterOptions.gridSize=grid;  
		clusterOptions.maxZoom=maxzoom;  
		mapObj.setClusterState("NormalCluster", clusterOptions);  
	}  
	this._Init(city,centerxy,zoomlevel);	
};

window.ARR_CITY={"0412":[12300234,4111576],"anshan":[12300234,4111576],"0915":[10903108,3269168],"ankang":[10903108,3269168],"0556":[11705087,3052700],"anqing":[11705087,3052700],"0853":[10592706,2625727],"anshun":[10592706,2625727],"0372":[11434609,3611120],"anyang":[11434609,3611120],"0837":[10222245,3189916],"abacangzuqiangzuzizhizhou":[10222245,3189916],"0483":[10567738,3883543],"alashanmeng":[10567738,3883543],"0897":[8010558,3250266],"alidiqu":[8010558,3250266],"0997":[8026231,4117029],"akesudiqu":[8026231,4117029],"0906":[8813553,4783502],"aletaidiqu":[8813553,4783502],"1853":[11353793,2219106],"aomentequ":[11353793,2219106],"0010":[11639794,3990817],"beijing":[11639794,3990817],"0312":[11546648,3887986],"baoding":[11546648,3887986],"0917":[10713888,3436980],"baoji":[10713888,3436980],"0414":[12378560,4129839],"benxi":[12378560,4129839],"0472":[10987128,4066165],"baotou":[10987128,4066165],"0552":[11740174,3293023],"bangbu":[11740174,3293023],"0779":[10912297,2147877],"beihai":[10912297,2147877],"0558":[11578256,3386959],"bozhou":[11578256,3386959],"0827":[10675462,3185735],"bazhong":[10675462,3185735],"0857":[10528839,2730322],"bijiediqu":[10528839,2730322],"0543":[11801594,3738320],"binzhou":[11801594,3738320],"0436":[12283815,4562036],"baicheng":[12283815,4562036],"0439":[12642384,4194010],"baishan":[12642384,4194010],"0943":[10415066,3655063],"baiyin":[10415066,3655063],"0909":[8207871,4491255],"boertalamengguzizhizhou":[8207871,4491255],"0776":[10661860,2390188],"baise":[10661860,2390188],"30898":[10944804,1922732],"baishalizuzizhixian":[10944804,1922732],"10898":[10969707,1864098],"baotinglizumiaozuzizhixian":[10969707,1864098],"0478":[10738830,4076690],"bayannaoer":[10738830,4076690],"0996":[8614590,4176429],"bayinguolengmengguzizhizhou":[8614590,4176429],"0875":[9916245,2511590],"baoshan":[9916245,2511590],"0028":[10406582,3065812],"chengdu":[10406582,3065812],"0023":[10654842,2955491],"chongqing":[10654842,2955491],"0431":[12532479,4388686],"changchun":[12532479,4388686],"0731":[11300934,2820846],"changsha":[11300934,2820846],"0565":[11787003,3160086],"chaohu":[11787003,3160086],"0768":[11664200,2367130],"chaozhou":[11664200,2367130],"0736":[11170267,2903663],"changde":[11170267,2903663],"0314":[11793455,4099546],"chengde":[11793455,4099546],"0519":[11997490,3176977],"changzhou":[11997490,3176977],"0566":[11748945,3065573],"chizhou":[11748945,3065573],"0550":[11831817,3230107],"chuzhou":[11831817,3230107],"0735":[11303211,2579684],"chenzhou":[11303211,2579684],"0476":[11895667,4226731],"chifeng":[11895667,4226731],"0355":[11311657,3619215],"changzhi":[11311657,3619215],"0317":[11686606,3831244],"cangzhou":[11686606,3831244],"0421":[12045036,4157352],"chaoyang":[12045036,4157352],"01771":[10733945,2242481],"chongzuo":[10733945,2242481],"0878":[10154472,2505492],"chuxiongyizuzizhizhou":[10154472,2505492],"0994":[8798822,4400443],"changjihuizuzizhizhou":[8798822,4400443],"20898":[10905275,1926004],"changjianglizuzizhixian":[10905275,1926004],"0804":[11000608,1973450],"chengmaixian":[11000608,1973450],"0895":[9715073,3115317],"changdudiqu":[9715073,3115317],"0411":[12161660,3891434],"dalian":[12161660,3891434],"0769":[11375934,2303843],"dongguan":[11375934,2303843],"0459":[12509426,4658832],"daqing":[12509426,4658832],"0415":[12439838,4013250],"dandong":[12439838,4013250],"0534":[11630186,3745454],"dezhou":[11630186,3745454],"0838":[10438767,3113681],"deyang":[10438767,3113681],"0546":[11867472,3743214],"dongying":[11867472,3743214],"0352":[11329977,4007839],"datong":[11329977,4007839],"0932":[10462188,3558519],"dingxi":[10462188,3558519],"0818":[10748828,3121256],"dazhou":[10748828,3121256],"0457":[12439736,5167366],"daxinganlingdiqu":[12439736,5167366],"0872":[10022212,2558423],"dalibaizuzizhizhou":[10022212,2558423],"0807":[10864258,1910283],"dongfang":[10864258,1910283],"0808":[11691780,2067052],"dongshaqundao":[11691780,2067052],"0805":[10958097,1951967],"danzhou":[10958097,1951967],"0692":[9858429,2443386],"dehongdaizujingpozuzizhizhou":[9858429,2443386],"0887":[9970213,2781911],"diqingcangzuzizhizhou":[9970213,2781911],"0477":[11000331,3982231],"eerduosi":[11000331,3982231],"0711":[11490367,3038979],"ezhou":[11490367,3038979],"0718":[10948234,3028991],"enshitujiazumiaozuzizhizhou":[10948234,3028991],"0591":[11930640,2607610],"fuzhou":[11930640,2607610],"0757":[11312148,2303049],"foshan":[11312148,2303049],"0413":[12392436,4186777],"fushun":[12392436,4186777],"0770":[10834648,2161459],"fangchenggang":[10834648,2161459],"01558":[11581977,3289710],"fuyang":[11581977,3289710],"0418":[12165389,4201431],"fuxin":[12165389,4201431],"0020":[11332232,2313410],"guangzhou":[11332232,2313410],"0851":[10671347,2657684],"guiyang":[10671347,2657684],"0773":[11028486,2528267],"guilin":[11028486,2528267],"0797":[11494226,2585526],"ganzhou":[11494226,2585526],"01755":[10960610,2309386],"guigang":[10960610,2309386],"0826":[10664179,3047063],"guangan":[10664179,3047063],"0839":[10583367,3243844],"guangyuan":[10583367,3243844],"0836":[10186571,3014135],"ganzicangzuzizhizhou":[10186571,3014135],"0941":[10290474,3498160],"gannancangzuzizhizhou":[10290474,3498160],"0954":[10624244,3601628],"guyuan":[10624244,3601628],"0975":[10024492,3447173],"guoluocangzuzizhizhou":[10024492,3447173],"0734":[11261222,2689625],"hengyang":[11261222,2689625],"0559":[11831741,2970985],"huangshan":[11831741,2970985],"0551":[11729575,3186934],"hefei":[11729575,3186934],"0310":[11448920,3659942],"handan":[11448920,3659942],"0752":[11441742,2308961],"huizhou":[11441742,2308961],"0571":[12017297,3027397],"hangzhou":[12017297,3027397],"0898":[11032019,2003230],"haikou":[11032019,2003230],"0572":[12009692,3087059],"huzhou":[12009692,3087059],"0714":[11505954,3020632],"huangshi":[11505954,3020632],"0429":[12085621,4074811],"huludao":[12085621,4074811],"0451":[12665218,4576127],"haerbin":[12665218,4576127],"0471":[11166665,4080826],"huhehaote":[11166665,4080826],"0561":[11679250,3396898],"huaibei":[11679250,3396898],"0554":[11699968,3263828],"huainan":[11699968,3263828],"0517":[11901545,3361197],"huaian":[11901545,3361197],"0762":[11469747,2375034],"heyuan":[11469747,2375034],"0778":[10806187,2469720],"hechi":[10806187,2469720],"01774":[11156285,2442791],"hezhou":[11156285,2442791],"0456":[12750094,5024788],"heihe":[12750094,5024788],"0713":[11487545,3044645],"huanggang":[11487545,3044645],"0392":[11429703,3574810],"hebi":[11429703,3574810],"0318":[11569849,3773536],"hengshui":[11569849,3773536],"0530":[11546035,3524748],"heze":[11546035,3524748],"0745":[10997674,2754836],"huaihua":[10997674,2754836],"0468":[13027854,4733105],"hegang":[13027854,4733105],"0470":[11975581,4924579],"hulunbeier":[11975581,4924579],"0916":[10703134,3307988],"hanzhong":[10703134,3307988],"0972":[10208626,3650918],"haidongdiqu":[10208626,3650918],"0970":[10097291,3694331],"haibeicangzuzizhizhou":[10097291,3694331],"0974":[10063772,3632438],"hainancangzuzizhizhou":[10063772,3632438],"0873":[10318003,2343013],"honghehanizuyizuzizhizhou":[10318003,2343013],"0973":[10181637,3546409],"huangnancangzuzizhizhou":[10181637,3546409],"0902":[9351430,4282630],"hamidiqu":[9351430,4282630],"0903":[7991119,3711133],"hetiandiqu":[7991119,3711133],"0391":[11322766,3523376],"jiaozuo":[11322766,3523376],"0716":[11224536,3032522],"jingzhou":[11224536,3032522],"0724":[11219617,3102774],"jingmen":[11219617,3102774],"0432":[12657134,4384583],"jilin":[12657134,4384583],"0750":[11308504,2258301],"jiangmen":[11308504,2258301],"0663":[11636978,2352756],"jieyang":[11636978,2352756],"0579":[11965157,2908961],"jinhua":[11965157,2908961],"0935":[10217508,3847637],"jinchang":[10217508,3847637],"0573":[12075854,3075392],"jiaxing":[12075854,3075392],"0792":[11599039,2971556],"jiujiang":[11599039,2971556],"0416":[12114768,4112609],"jinzhou":[12114768,4112609],"0531":[11702059,3665935],"jinan":[11702059,3665935],"0454":[13036958,4680745],"jiamusi":[13036958,4680745],"0798":[11719291,2929804],"jingdezhen":[11719291,2929804],"0537":[11658763,3541325],"jining":[11658763,3541325],"01391":[11258811,3509032],"jiyuan":[11258811,3509032],"0796":[11498670,2711363],"jian":[11498670,2711363],"0356":[11285273,3549055],"jincheng":[11285273,3549055],"0354":[11275219,3768830],"jinzhong":[11275219,3768830],"0937":[9851387,3975629],"jiuquan":[9851387,3975629],"0467":[13096985,4529516],"jixi":[13096985,4529516],"1937":[9827845,3978450],"jiayuguan":[9827845,3978450],"0871":[10270330,2504989],"kunming":[10270330,2504989],"0990":[8493115,4559635],"kelamayi":[8493115,4559635],"0378":[11434021,3478931],"kaifeng":[11434021,3478931],"0998":[7599456,3946086],"kashidiqu":[7599456,3946086],"0908":[7616897,3971486],"kezilesukeerkezizizhizhou":[7616897,3971486],"0316":[11670595,3951925],"langfang":[11670595,3951925],"0833":[10374637,2958661],"leshan":[10374637,2958661],"0772":[10941260,2430675],"liuzhou":[10941260,2430675],"0379":[11240052,3465668],"luoyang":[11240052,3465668],"0830":[10544386,2888885],"luzhou":[10544386,2888885],"0419":[12317913,4127777],"liaoyang":[12317913,4127777],"0437":[12514451,4290580],"liaoyuan":[12514451,4290580],"02935":[10493365,3346954],"longnan":[10493365,3346954],"0518":[11917283,3459589],"lianyungang":[11917283,3459589],"0635":[11598553,3645606],"liaocheng":[11598553,3645606],"0357":[11152689,3610209],"linfen":[11152689,3610209],"0539":[11834642,3505378],"linyi":[11834642,3505378],"0578":[11991676,2845222],"lishui":[11991676,2845222],"0564":[11649146,3174263],"liuan":[11649146,3174263],"0931":[10383514,3605988],"lanzhou":[10383514,3605988],"0358":[11113007,3752029],"lvliang":[11113007,3752029],"0738":[11199822,2772585],"loudi":[11199822,2772585],"0891":[9111893,2965527],"lasa":[9111893,2965527],"01772":[10922178,2373505],"laibin":[10922178,2373505],"0395":[11403599,3356728],"luohe":[11403599,3356728],"0634":[11767850,3621357],"laiwu":[11767850,3621357],"0597":[11703256,2509457],"longyan":[11703256,2509457],"0930":[10320108,3559138],"linxiahuizuzizhizhou":[10320108,3559138],"0834":[10224228,2790951],"liangshanyizuzizhizhou":[10224228,2790951],"0858":[10483041,2659317],"liupanshui":[10483041,2659317],"2802":[10917540,1875210],"ledonglizuzizhixian":[10917540,1875210],"1896":[10968596,1991214],"lingaoxian":[10968596,1991214],"0809":[11004335,1850740],"lingshuilizuzizhixian":[11004335,1850740],"0894":[9448193,2957446],"linzhidiqu":[9448193,2957446],"0888":[10023016,2687622],"lijiang":[10023016,2687622],"0883":[10009243,2388042],"lincang":[10009243,2388042],"0668":[11092743,2166162],"maoming":[11092743,2166162],"0753":[11611786,2429877],"meizhou":[11611786,2429877],"01833":[10382616,3003885],"meishan":[10382616,3003885],"0816":[10472555,3146699],"mianyang":[10472555,3146699],"0555":[11850203,3169299],"maanshan":[11850203,3169299],"0453":[12962273,4458475],"mudanjiang":[12962273,4458475],"0025":[11879245,3205621],"nanjing":[11879245,3205621],"0513":[12087053,3200933],"nantong":[12087053,3200933],"0574":[12154399,2986833],"ningbo":[12154399,2986833],"0593":[11953668,2665281],"ningde":[11953668,2665281],"0771":[10831065,2281781],"nanning":[10831065,2281781],"0791":[11589736,2867875],"nanchang":[11589736,2867875],"0817":[10609478,3078437],"nanchong":[10609478,3078437],"01832":[10506291,2958250],"neijiang":[10506291,2958250],"0599":[11817859,2663989],"nanping":[11817859,2663989],"0377":[11253403,3299929],"nanyang":[11253403,3299929],"1891":[11662623,1132375],"nanshaqundao":[11662623,1132375],"0896":[9205910,3147416],"naqudiqu":[9205910,3147416],"0886":[9885615,2585187],"nujianglisuzuzizhizhou":[9885615,2585187],"0594":[11900519,2543397],"putian":[11900519,2543397],"0427":[12207105,4111880],"panjin":[12207105,4111880],"0375":[11330355,3372739],"pingdingshan":[11330355,3372739],"0933":[10672523,3550973],"pingliang":[10672523,3550973],"0393":[11502927,3576321],"puyang":[11502927,3576321],"0812":[10169912,2657330],"panzhihua":[10169912,2657330],"0879":[10097029,2277753],"puer":[10097029,2277753],"0799":[11385204,2762272],"pingxiang":[11385204,2762272],"0532":[12035684,3608399],"qingdao":[12035684,3608399],"0595":[11858451,2492950],"quanzhou":[11858451,2492950],"0335":[11958956,3994789],"qinhuangdao":[11958956,3994789],"0452":[12393716,4734158],"qiqihaer":[12393716,4734158],"0464":[13100789,4577190],"qitaihe":[13100789,4577190],"0934":[10786150,3593441],"qingyang":[10786150,3593441],"0874":[10378431,2549134],"qujing":[10378431,2549134],"0763":[11304546,2368823],"qingyuan":[11304546,2368823],"02728":[11289448,3041984],"qianjiang":[11289448,3041984],"0777":[10860871,2195085],"qinzhou":[10860871,2195085],"0855":[10798100,2658306],"qiandongnanmiaozudongzuzizhizhou":[10798100,2658306],"0854":[10751129,2628303],"qiannanbuyizumiaozuzizhizhou":[10751129,2628303],"0859":[10490508,2508806],"qianxinanbuyizumiaozuzizhizhou":[10490508,2508806],"1894":[11045830,1924430],"qionghai":[11045830,1924430],"1899":[10981234,1926692],"qiongzhonglizumiaozuzizhixian":[10981234,1926692],"0633":[11952630,3541875],"rizhao":[11952630,3541875],"0892":[8888838,2927172],"rikazediqu":[8888838,2927172],"0021":[12147591,3122435],"shanghai":[12147591,3122435],"0751":[11359843,2480239],"shaoguan":[11359843,2480239],"0754":[11672373,2336010],"shantou":[11672373,2336010],"0660":[11536815,2277816],"shanwei":[11536815,2277816],"0755":[11405557,2254214],"shenzhen":[11405557,2254214],"0899":[10951361,1823551],"sanya":[10951361,1823551],"0434":[12439796,4317251],"siping":[12439796,4317251],"0512":[12063869,3132054],"suzhou":[12063869,3132054],"0719":[11078200,3265530],"shiyan":[11078200,3265530],"0024":[12343404,4180567],"shenyang":[12343404,4180567],"0575":[12058611,2999576],"shaoxing":[12058611,2999576],"0739":[11146727,2723714],"shaoyang":[11146727,2723714],"0311":[11447649,3804827],"shijiazhuang":[11447649,3804827],"0455":[12699038,4663697],"suihua":[12699038,4663697],"0722":[11337549,3171670],"suizhou":[11337549,3171670],"0598":[11764040,2626805],"sanming":[11764040,2626805],"0398":[11119150,3477577],"sanmenxia":[11119150,3477577],"0793":[11797648,2844298],"shangrao":[11797648,2844298],"0469":[13115989,4664694],"shuangyashan":[13115989,4664694],"0370":[11565145,3443892],"shangqiu":[11565145,3443892],"0914":[10994310,3388245],"shangluo":[10994310,3388245],"0557":[11698374,3363805],"suzhou1":[11698374,3363805],"0527":[11829665,3395387],"suqian":[11829665,3395387],"0893":[9180495,2924067],"shannandiqu":[9180495,2924067],"0349":[11242935,3931856],"shuozhou":[11242935,3931856],"0438":[12482386,4514089],"songyuan":[12482386,4514089],"0952":[10638630,3901457],"shizuishan":[10638630,3901457],"0993":[8605264,4430505],"shihezi":[8605264,4430505],"0825":[10558302,3051374],"suining":[10558302,3051374],"01719":[11067610,3174480],"shennongjialinqu":[11067610,3174480],"0022":[11725238,3910385],"tianjin":[11725238,3910385],"0351":[11253148,3785512],"taiyuan":[11253148,3785512],"0315":[11816733,3963528],"tangshan":[11816733,3963528],"0576":[12145590,2867079],"taizhou1":[12145590,2867079],"0523":[11992084,3246166],"taizhou":[11992084,3246166],"0538":[11712131,3618125],"taian":[11712131,3618125],"0995":[8921069,4300696],"tulufandiqu":[8921069,4300696],"0901":[8301478,4675226],"tachengdiqu":[8301478,4675226],"0938":[10570162,3458746],"tianshui":[10570162,3458746],"01728":[11316391,3065128],"tianmen":[11316391,3065128],"0410":[12384254,4228668],"tieling":[12384254,4228668],"0435":[12594016,4172917],"tonghua":[12594016,4172917],"0475":[12226109,4360591],"tongliao":[12226109,4360591],"0856":[10918765,2771841],"tongrendiqu":[10918765,2771841],"0562":[11781080,3094457],"tongling":[11781080,3094457],"0919":[10894760,3490046],"tongchuan":[10894760,3490046],"1892":[11009798,1936412],"tunchangxian":[11009798,1936412],"0553":[11837574,3132727],"wuhu":[11837574,3132727],"0510":[12035899,3156113],"wuxi":[12035899,3156113],"0577":[12063751,2802701],"wenzhou":[12063751,2802701],"0027":[11428146,3057814],"wuhan":[11428146,3057814],"0536":[11912240,3671588],"weifang":[11912240,3671588],"0631":[12212200,3750430],"weihai":[12212200,3750430],"0474":[11312109,4103170],"wulanchabu":[11312109,4103170],"0473":[10681399,3966916],"wuhai":[10681399,3966916],"0991":[8761680,4382347],"wulumuqi":[8761680,4382347],"0953":[10619446,3798515],"wuzhong":[10619446,3798515],"0774":[11130446,2350355],"wuzhou":[11130446,2350355],"01935":[10263355,3793167],"wuwei":[10263355,3793167],"0913":[10951027,3450733],"weinan":[10951027,3450733],"1898":[11038481,1880552],"wanning":[11038481,1880552],"1893":[11072373,1962865],"wenchang":[11072373,1962865],"1897":[10951668,1877597],"wuzhishan":[10951668,1877597],"0876":[10424556,2337048],"wenshanzhuangzumiaozuzizhizhou":[10424556,2337048],"0592":[11811706,2448376],"xiamen":[11811706,2448376],"0910":[10870988,3432678],"xianyang":[10870988,3432678],"0029":[10895440,3426491],"xian":[10895440,3426491],"0732":[11290663,2786118],"xiangtan":[11290663,2786118],"0710":[11213526,3206201],"xiangfan":[11213526,3206201],"0374":[11383224,3402215],"xuchang":[11383224,3402215],"0373":[11388989,3530154],"xinxiang":[11388989,3530154],"0516":[11717395,3425857],"xuzhou":[11717395,3425857],"0728":[11345315,3036457],"xiantao":[11345315,3036457],"0376":[11407523,3212399],"xinyang":[11407523,3212399],"0712":[11391853,3092464],"xiaogan":[11391853,3092464],"0350":[11273463,3841578],"xinzhou":[11273463,3841578],"0790":[11491810,2781631],"xinyu":[11491810,2781631],"0971":[10177662,3661723],"xining":[10177662,3661723],"0715":[11433565,2983369],"xianning":[11433565,2983369],"0563":[11875473,3094685],"xuancheng":[11875473,3094685],"0319":[11450431,3707168],"xingtai":[11450431,3707168],"0482":[12213469,4608717],"xinganmeng":[12213469,4608717],"0691":[10079925,2201089],"xishuangbannadaizuzizhizhou":[10079925,2201089],"0743":[10960062,2794721],"xiangxitujiazumiaozuzizhizhou":[10960062,2794721],"1895":[11158354,1646405],"xishaqundao":[11158354,1646405],"0479":[11608816,4394614],"xilinguolemeng":[11608816,4394614],"1852":[11415866,2227940],"xianggangtequ":[11415866,2227940],"0831":[10462127,2877053],"yibin":[10462127,2877053],"0417":[12225018,4067161],"yingkou":[12225018,4067161],"0662":[11198362,2187195],"yangjiang":[11198362,2187195],"0911":[10949563,3659482],"yanan":[10949563,3659482],"0730":[11310819,2936631],"yueyang":[11310819,2936631],"0877":[10253592,2434715],"yuxi":[10253592,2434715],"0717":[11129485,3070117],"yichang":[11129485,3070117],"0515":[12013921,3337938],"yancheng":[12013921,3337938],"0535":[12139234,3753789],"yantai":[12139234,3753789],"0514":[11941286,3241947],"yangzhou":[11941286,3241947],"0458":[12890114,4772473],"yichun":[12890114,4772473],"0912":[10975369,3829538],"yulin":[10975369,3829538],"0775":[11015071,2262552],"yulin1":[11015071,2262552],"0737":[11235554,2857997],"yiyang":[11235554,2857997],"0766":[11204402,2292937],"yunfu":[11204402,2292937],"0359":[11099764,3503148],"yuncheng":[11099764,3503148],"0795":[11439883,2780680],"yichun1":[11439883,2780680],"0701":[11703370,2823940],"yingtan":[11703370,2823940],"0746":[11160791,2643804],"yongzhou":[11160791,2643804],"0951":[10628321,3846279],"yinchuan":[10628321,3846279],"0353":[11358023,3785667],"yangquan":[11358023,3785667],"0835":[10301511,2999366],"yaan":[10301511,2999366],"0999":[8133832,4392325],"yilihasakezizhizhou":[8133832,4392325],"01433":[12949765,4289415],"yanbianchaoxianzuzizhizhou":[12949765,4289415],"0976":[9700278,3300709],"yushucangzuzizhizhou":[9700278,3300709],"0596":[11766598,2451235],"zhangzhou":[11766598,2451235],"0756":[11354721,2225316],"zhuhai":[11354721,2225316],"0759":[11042057,2119885],"zhanjiang":[11042057,2119885],"0758":[11247572,2307338],"zhaoqing":[11247572,2307338],"0760":[11337154,2252499],"zhongshan":[11337154,2252499],"0733":[11314944,2784064],"zhuzhou":[11314944,2784064],"0371":[11366304,3476186],"zhengzhou":[11366304,3476186],"0580":[12210554,3001320],"zhoushan":[12210554,3001320],"0511":[11944242,3221104],"zhenjiang":[11944242,3221104],"0813":[10477024,2935338],"zigong":[10477024,2935338],"0533":[11805007,3680633],"zibo":[11805007,3680633],"0832":[10465067,3012856],"ziyang":[10465067,3012856],"0744":[11047699,2911967],"zhangjiajie":[11047699,2911967],"0313":[11488985,4082621],"zhangjiakou":[11488985,4082621],"0852":[10693122,2769261],"zunyi":[10693122,2769261],"0396":[11402801,3298317],"zhumadian":[11402801,3298317],"01953":[10568600,3748289],"zhongwei":[10568600,3748289],"0936":[10045086,3893096],"zhangye":[10045086,3893096],"0394":[11465304,3361658],"zhoukou":[11465304,3361658],"0870":[10370376,2736556],"zhaotong":[10370376,2736556],"0632":[11730869,3481272],"zaozhuang":[11730869,3481272],"2801":[11446620,1559274],"zhongshaqundaodedaojiaojiqihaiyu":[11446620,1559274],"0794":[11635463,2799251],"fuzhou1":[11635463,2799251],"0570":[11887437,2893580],"quzhou":[11887437,2893580],"32":[11639794,3990817],"31":[12147591,3122435],"30":[11725238,3910385],"28":[10654842,2955491],"33":[11353793,2219106],"aomen":[11353793,2219106],"7":[11729575,3186934],"anhuisheng":[11729575,3186934],"24":[11930640,2607610],"fujiansheng":[11930640,2607610],"3":[11332232,2313410],"guangdongsheng":[11332232,2313410],"10":[10831065,2281781],"guangxi":[10831065,2281781],"23":[10671347,2657684],"guizhousheng":[10671347,2657684],"13":[10383514,3605988],"gansusheng":[10383514,3605988],"19":[11447649,3804827],"hebeisheng":[11447649,3804827],"4":[11366304,3476186],"henansheng":[11366304,3476186],"6":[11428146,3057814],"hubeisheng":[11428146,3057814],"12":[11300934,2820846],"hunansheng":[11300934,2820846],"15":[12665218,4576127],"heilongjiang":[12665218,4576127],"2":[11032019,2003230],"hainansheng":[11032019,2003230],"22":[12532479,4388686],"jilinsheng":[12532479,4388686],"14":[11879245,3205621],"jiangsusheng":[11879245,3205621],"18":[11589736,2867875],"jiangxisheng":[11589736,2867875],"11":[12343404,4180567],"liaoningsheng":[12343404,4180567],"16":[11166665,4080826],"neimenggu":[11166665,4080826],"27":[10628321,3846279],"ningxia":[10628321,3846279],"26":[10177662,3661723],"qinghaisheng":[10177662,3661723],"17":[11253148,3785512],"shanxisheng":[11253148,3785512],"5":[11702059,3665935],"shandongsheng":[11702059,3665935],"21":[10895440,3426491],"shanxisheng":[10895440,3426491],"1":[10406582,3065812],"sichuansheng":[10406582,3065812],"9":[8761680,4382347],"xinjiang":[8761680,4382347],"29":[11415866,2227940],"xianggang":[11415866,2227940],"25":[9111893,2965527],"xicang":[9111893,2965527],"8":[10270330,2504989],"yunnansheng":[10270330,2504989],"20":[12017297,3027397],"zhejiangsheng":[12017297,3027397],"":[11639794,3990817]};

